package thread;

/**
 * 线程创建方式1：继承Thread类，重写run()方法
 *
 */
public class threadDemo1 {
    public static void main(String[] args) {
        Thread t1 = new MyThread1();
        Thread t2 = new MyThread2();
        /*启动线程要调用start()  方法*/
        t1.start();
        t2.start();

    }
}
class MyThread1 extends Thread{
    public void run(){
        for(int i =0 ;i<10000;i++){
            System.out.println("你是谁？");
        }
    }

}
class MyThread2 extends Thread{
    public void run(){
        for (int i = 0; i < 10000; i++) {
            System.out.println("。。。。。。。。。。");
        }
    }

}

